@echo off
 
setlocal enabledelayedexpansion 
 
echo ---------------------------------------------
echo. >imagesList20240304.txt
for /f %%i in ('dir /b *.*') do echo ^<img src="%%~nxi"/^>>>imagesList20240304.txt
if not exist imagesList20240304.txt goto no_file
start imagesList20240304.txt
exit

echo ---------------------------------------------